Home > biomechZoo > Toolbox > Support Functions > engine.m

engine

PURPOSE ^

fl = ENGINE(varargin) is a file searching algorithm

SYNOPSIS ^

function file_list = engine(varargin)

DESCRIPTION ^

 fl = ENGINE(varargin) is a file searching algorithm

 inputs are in pairs where the first element is the property name and the second is a property value
 The 'path' property is required.  All other properties are optional. All arguments must be strings.

 ARGUMENTS
  'path', 'pth' or 'fld'       ...  root folder path to begin the search as string
  'extension' or 'ext'         ...  type of file to search as string. ex. '.c3d' or 'csv' ('.' not necessary)
  'file' or 'search file'      ...  return only files containing specific string ex. '_g_'
  'substring' , 'search path'  ...  search for a particular string in the path name ex 'hello' in data/helloworld and data/worldhello
  'subfolder' or 'folder'      ...  search only in folders of a specific name located downstream from the root path (string)
                                    ex 'helloworld' searches only in folders called 'helloworld'

 RETURNS
  fl                           ...  list of files as cell array of strings

 e.g. #1 Return all files in the root folder C:/Users/Public which contain the
 string 'imba':
 fl = engine('path','C:/Users/Public','search file','imba')

 e.g. #2 Return all files in the root folder C:/Users/Public which are
 located in the subfolder Sample Music:
 fld = 'C:/Users/Public';
 fl = engine('path',fld,'search path','Sample Music')

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 10-Mar-2024 22:39:06 by m2html © 2005